/**********************************************************
Leo Engine - v0.1

file: leo_entity.h
creation date: 15/05/2009
**********************************************************/
#pragma once
#ifndef LEO_ENTITY3D_H
#define LEO_ENTITY3D_H
//---------------------------------------------------------
#include "system/System.h"
#include "../Graphics/VertexBuffer.h"
#include "../Graphics/IndexBuffer.h"
#include "../Graphics/GraphicsStructs.h"


namespace leo
{

class Graphics;


#define SPRITE		 0	
#define SHAPE		 1

class LEO_API Entity3D
{


public:
	Entity3D(void);
	~Entity3D(void);

	virtual	void Update(float _timeBetweenFrames);
	void Draw(Graphics* _graph) const;

	virtual void OnCollide(Entity3D &_ent, float _px, float _py);

	void SetAngle(float _angle);
	void SetSpeed(float _speed);
	float GetPosY() const;
	float GetPosX() const;
	void SetPos(float _x, float _y);
	int GetType() const;
	bool IsMovig() const;
	void SetMoving(bool _moving);
	void SetScale(float s);

protected:
	//el draw que van a usar las demas clases
	float posX, posY, posZ;
	float movAngle;
	float movSpeed;
	bool  isMoving;
	float scale;

	virtual void OnDraw(Graphics *_graph) const {};
	virtual void OnUpdate(float _timeBetweenFrames) {};

// para las colisiones  posiblemente cuando colisionen
	bool	visible;
//para saber con que tipo de entity estoy colisionando
	int		type;
};

#include "Entity3D.inl"

}

#endif
